namespace SumerCoreDevOps.Shared.Models;

/// <summary>
/// 环境信息
/// </summary>
public class EnvironmentInfo
{
    /// <summary>
    /// 环境名称（如 dotnet, java, node 等）
    /// </summary>
    public string Name { get; set; } = null!;

    /// <summary>
    /// 版本号
    /// </summary>
    public string Version { get; set; } = null!;

    /// <summary>
    /// 完整路径
    /// </summary>
    public string? Path { get; set; }

    /// <summary>
    /// 是否已安装
    /// </summary>
    public bool IsInstalled { get; set; }

    /// <summary>
    /// 额外信息
    /// </summary>
    public Dictionary<string, string> Metadata { get; set; } = [];
}

/// <summary>
/// 环境需求
/// </summary>
public class EnvironmentRequirement
{
    /// <summary>
    /// 环境名称
    /// </summary>
    public string Name { get; set; } = null!;

    /// <summary>
    /// 最低版本要求（可选）
    /// </summary>
    public string? MinVersion { get; set; }

    /// <summary>
    /// 推荐版本（可选）
    /// </summary>
    public string? RecommendedVersion { get; set; }

    /// <summary>
    /// 是否必需
    /// </summary>
    public bool IsRequired { get; set; } = true;
}
